package org.arain.baseii.grid;

import com.alibaba.fastjson.JSONArray;

public class GridData {
	private Integer page = 1;
	private Integer rowpage = 20;
	private Integer total = 0;
	private JSONArray rows = new JSONArray();

	public void setPage(final Integer page) {
		this.page = page;
	}

	public void setRowpage(final Integer rowpage) {
		this.rowpage = rowpage;
	}

	public void setTotal(final Integer total) {
		this.total = total;
	}

	public Integer getPage() {
		return this.page;
	}

	public Integer getRowpage() {
		return this.rowpage;
	}

	public Integer getTotal() {
		return this.total;
	}

	public JSONArray getRows() {
		return this.rows;
	}

	public void setRows(final JSONArray rows) {
		this.rows = rows;
	}
	
	public static String gridToJson(GridData data) {
		return net.sf.json.JSONObject.fromObject(data).toString();
	}
}
